//
//  SVMPViewController.m
//  SilenceVoice
//
//  Created by 张诗宇 on 16/1/27.
//  Copyright © 2016年 张诗宇. All rights reserved.
//

#import "SVMPViewController.h"
#import "SVMPModel.h"
#import "SVMPView.h"

@interface SVMPViewController ()

@property (nonatomic, retain) SVMPView *musicBg;

@property (nonatomic, retain) UIButton *playBtn;

@property (nonatomic, retain) NSMutableArray *musicIdArray;

@property (nonatomic, retain) UISlider *progressSlider;

@property (nonatomic, retain) NSTimer *musicTimer;

@property (nonatomic, retain) UILabel *musicTimeLabel;

@property (nonatomic, retain) UIButton *likeBtn;

@property (nonatomic, retain) UIButton *single;

@property (nonatomic, retain) SVMPModel *musicModel;

@property (nonatomic, assign) BOOL likeBtnState;

@property (nonatomic, retain) NSMutableDictionary *dict;

@property (nonatomic, copy) NSString *singleState;


@end

@implementation SVMPViewController

+ (instancetype)sharePlayerViewController {
    static SVMPViewController *player = nil;
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        player = [[SVMPViewController alloc]init];
        
    });
    
    return player;
}

- (void)nextMusic {
    
}

- (void)lastMusic {
    
    
}

- (void)startAndstopBtn:(UIButton *)sender {
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor lightGrayColor];
    self.player = [[STKAudioPlayer alloc] initWithOptions:(STKAudioPlayerOptions) {
         .flushQueueOnSeek = YES, .enableVolumeMixer = YES, .equalizerBandFrequencies = {50, 100, 200, 400, 800, 1600, 2600, 16000}
    }];
    self.player.volume = 0.5;
    //是否启用音频测量，默认为NO，一旦启用音频测量可以通过updateMeters方法更新测量值
    self.player.meteringEnabled = YES;

    // 后台信息字典
    self.dict = [NSMutableDictionary dictionary];
    self.musicIdArray = [NSMutableArray array];
    self.likeBtnState = NO;
    
    // 背景ImageView
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
